<template>
  <el-dialog
    title="用户反馈"
    :visible.sync="detailVisible"
    :destroy-on-close=true
    @close="handleClose"
    width="60%">

    <el-card class="update-log" width="100%"   v-loading="loading">
      <div slot="header" class="clearfix">
        <h3>{{ feedback.title }}</h3>
      </div>

      <template slot="title">
        <i class="el-icon-alarm-clock"/>{{ parseTime(feedback.createTime, '{y}-{m}-{d}') }} ---
        <i class="el-icon-chat-line-round"/> {{ feedback.title }}
      </template>
      <el-descriptions class="margin-top" title="" :column="3" :size="size" border>
        <template slot="extra">
          <span>反馈时间：{{ feedback.createTime }}</span>
          <el-button type="primary" size="small">处理反馈</el-button>
        </template>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-user"></i>
            联系人
          </template>
          {{ feedback.username }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-mobile-phone"></i>
            手机号
          </template>
          {{ feedback.telephone }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-location-outline"></i>
            邮箱
          </template>
          {{ feedback.email }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-office-building"></i>
            反馈内容
          </template>
          <div class="ql-editor" v-html=feedback.content></div>
        </el-descriptions-item>
      </el-descriptions>
    </el-card>
  </el-dialog>
</template>

<script>
import {getFeedback} from "@/api/ums/feedback";

export default {
  props: {
  },
  name: "detailFeedback",
  data() {
    return {
      loading:true,
      feedbackId: '',
      detailVisible: false,
      feedback: {}
    }
  },
  created() {
    // this.showFeedback()
  },
  methods: {
    showFeedback(show,feedbackId) {
      this.loading=true
      getFeedback(feedbackId).then(res => {
        this.feedback = res.data;
      })
      this.detailVisible=show
      this.loading=false
    },
    handleClose(done) {
      this.feedback=''
      this.loading=false
      done()
    }
  }
}
</script>

<style scoped>

</style>
